/****************************************
Header name: MainFace.c
Author: Gu Zhengxiong
Version: 2013.11.21
Description:The file implements functions in MainFace.h.
****************************************/

# include <stdio.h>
# include <stdlib.h>

# include "MainFace.h"

void
SetCmdProperty (void)
{
	system ("cls");
	system ("color a");
}
void
ShowFace (void)
{
	SetCmdProperty ();
	printf ("STUDENT MANAGEMENT SYSTEM\n");
	printf ("Welcome to the student management system ver 1.0\nBy Gu Zhengxiong & Zhang Hang\n\n\n");
	
	printf ("* * * * * * * * * * * * * * * MAIN MENU * * * * * * * * * * * * * * *\n");
	printf ("*            1 Add                       2 Delete                   *\n");
	printf ("*            3 Load                      4 File                     *\n");
	printf ("*            5 Sort                      6 Insert                   *\n");
	printf ("*            7 Inquire                   8 Modify                   *\n");
	printf ("*            9 Display                   0 Quit                     *\n");
}
void
ShowError (int error_type)
{
	switch (error_type)
	{
	case IN_ERR: 
		{
			printf ("Inputs Error!!!\nPress Enter to return....");
			getchar ();
			getchar ();
			break;
		}
		case MAL_ERR: 
			{
				printf ("Memory allocation error!!!\nPressEnter to quit....");
				getchar ();
				getchar ();
				exit (EXIT_FAILURE);
				break;
			}
	}
}